﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Frogs.Stability.CircuitBreaker.Exceptions
{
    /// <summary>
    /// Exception thrown when an attempt to execute on a half-open circuit breaker fails
    /// </summary>
    public class HalfOpenCircuitBreakerException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the Frogs.Stability.CircuitBreaker.Exceptions.HalfOpenCircuitBreakerException
        /// </summary>
        public HalfOpenCircuitBreakerException()
            : base()
        {
        }

        /// <summary>
        /// Initializes a new instance of the Frogs.Stability.CircuitBreaker.Exceptions.HalfOpenCircuitBreakerException with a specified error message
        /// </summary>
        /// <param name="message"></param>
        public HalfOpenCircuitBreakerException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the Frogs.Stability.CircuitBreaker.Exceptions.HalfOpenCircuitBreakerException with a specified error message
        /// and a reference to the inner exception that is the cause of this exception.
        /// </summary>
        /// <param name="message"></param>
        /// <param name="innerException"></param>
        public HalfOpenCircuitBreakerException(string message, Exception innerException)
            : base(message, innerException)
        {
        }

        /// <summary>
        /// Initializes a new instance of the Frogs.Stability.CircuitBreaker.Exceptions.HalfOpenCircuitBreakerException with serialized data.
        /// </summary>
        /// <param name="info"></param>
        /// <param name="context"></param>
        public HalfOpenCircuitBreakerException(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
            : base(info, context)
        {
        }    }
}
